FROM maven:3-openjdk-8 as build
WORKDIR /app
COPY . .
RUN mvn clean package

FROM openjdk:8-jre-alpine
WORKDIR /app
COPY --from=build /app/target/QiuMo-Jetbrains-Help.jar QiuMo-Jetbrains-Help.jar
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
EXPOSE 10768
ENTRYPOINT ["java", "-jar", "QiuMo-Jetbrains-Help.jar"]
